<html>
<body>
<script language="javascript">

  function disableField()
  {
  document.form1.categorical.disabled=true;
  document.form1.Timerange.disabled=true;
  }

  function enableField()
  {
  document.form1.categorical.disabled=false;
  if(window.document.forms['form1'].elements['categorical'].options[document.forms['form1'].elements['categorical'].selectedIndex].text =="none"){

    document.form1.Timerange.disabled=false;
    
   }
  }

  function enable2(){
  if(window.document.forms['form1'].elements['categorical'].options[document.forms['form1'].elements['categorical'].selectedIndex].text =="none"){



  window.document.forms['form1'].elements['Timerange'].disabled=false;
  }
  else{
  document.form1.Timerange.disabled=true;
  }

  }


</script>
<FORM METHOD="POST" ACTION="script.cgi" name="form1">

<INPUT TYPE="RADIO" NAME="btn1" VALUE="rate" onclick="javascript:enableField()">
<INPUT TYPE="RADIO" NAME="btn1" VALUE="count" onclick="javascript:disableField()">

Time:<br />
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;relative
        <label>
        <select name="categorical" id="categorical" "disabled" onclick="javascript:enable2()"/>
          <option value="none" selected="selected">none</option>
          <option value="Period">Period</option>
          <option value="Epoch">Epoch</option>
          <option value="Stage">Stage</option>
        </select>
        </label>
      <p align="left">&nbsp;&nbsp; absolute 
        <label>
        <input type="text" name="Timerange" id="Timerange" "disabled"/>
        </label>
        <label></label>
    M.Y. intervals
          
</FORM> 
</body>
</html>